#if !defined(AFX_MEGASLIDER_H__2A526C1D_1209_444F_8621_6413A15B6A29__INCLUDED_)
#define AFX_MEGASLIDER_H__2A526C1D_1209_444F_8621_6413A15B6A29__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MegaSlider.h : header file
//

#include "MegaBitmap.h"

/////////////////////////////////////////////////////////////////////////////
// CMegaSlider window

class CMegaSlider : public CWnd
{
// Construction
public:
	CMegaSlider();

// Attributes
public:

// Operations
public:
	void SetBitmaps(UINT uiLeft, UINT uiRight, UINT uiCursor);
	void SetScrollRange(int nMin, int nMax);
	void SetRange(int nMin, int nMax);
	void SetScrollPos(int nPos);
	void SetPos(int nPos);
	void GetScrollRange(int * pMin, int * pMax);
	void GetRange(int& min, int& max);
	int GetScrollPos();
	int GetPos();

	void SetBackgroundBmp(CMegaBitmap * pBack);

protected:
	CMegaBitmap *m_pLeftBmp, *m_pRightBmp, *m_pCursorBmp;

	CDC m_dcBack;
	CMegaBitmap m_BackBmp;
	CGdiObject * m_pOldBackBmp;

	int m_nMin, m_nMax, m_nPos;
	bool m_bDrag;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMegaSlider)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMegaSlider();

	// Generated message map functions
protected:
	//{{AFX_MSG(CMegaSlider)
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MEGASLIDER_H__2A526C1D_1209_444F_8621_6413A15B6A29__INCLUDED_)
